home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HPAVC
/
HPAVC CD-ROM.iso
/
ABUSESRC.ZIP
/
AbuseSrc
/
macabuse
/
imlib
/
include
/
jrand.hpp
< prev
next >
Wrap
C/C++ Source or Header
|
1997-05-20
|
384b
|
14 lines
#ifndef __JRAND_HPP_
#define __JRAND_HPP_
#define RAND_TABLE_SIZE 1024
extern unsigned short rtable[RAND_TABLE_SIZE]; // can be used directly when
extern unsigned short rand_on; // speed is of essence
void jrand_init();
inline unsigned short jrand() { return rtable[(rand_on++)&(RAND_TABLE_SIZE-1)]; }
#define jrandom(x) (jrand()%(x))
#endif